<div class="content-table">
    <?php
        echo $this->partial('topo_list.phtml', array(
            'titulo' => $this->titulo,
            'controller' => $this->controller, 
            'search' => $this->search,
            'add'   =>  FALSE, 
            'form_search' => TRUE,
            'filtro' => TRUE,
            'btn_submit' => TRUE,
        ));
    ?> 
    <table id="tlist" class="tb_content">
        <thead>
            <tr>
                <th width="140">Data/Hora</th>
                <th>Aluno</th>
                <th>Página</th>
                <th>Conteúdo</th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($this->result as $row) { 
                $usu = $row->findDependentRowSet("Ead_Model_DbTable_Usuarios"); 
            ?>
                <tr>
                    <td align="left"><?php echo Datetools::invertDH($row->ACE_DATHOR); ?></td>
                    <td align="left"><?php echo $usu[0]['USU_NOME']; ?></td> 
                    <td align="left"><?php echo $row->ACE_CTL; ?></td>
                    <td align="left">
                    <?php 
                    if($row->ACE_CTL == 'materiais'){
                        $obj = new Ead_Model_DbTable_Material();
                        $res = $obj->fetchRow('MAT_ID = ' . $row->ACE_COD);
                        
                        echo $res->MAT_NOM;
                    }
                    else if($row->ACE_CTL == 'videoaulas'){
                        $obj = new Ead_Model_DbTable_Videoaulas();
                        $res = $obj->fetchRow('VID_ID = ' . $row->ACE_COD);
                        
                        echo $res->VID_NOM;
                    }
                    else if($row->ACE_CTL == 'meuscursos'){
                        $obj = new Ead_Model_DbTable_Conteudo();
                        $res = $obj->fetchRow('CON_ID = ' . $row->ACE_COD);
                        
                        echo $res->CON_NOM;
                    }
                    ?>
                    </td> 
                </tr>
            <?php  } ?>
        </tbody>
    </table>
</div>
<?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>
